import request from '../../service/index.js'


// 首页信息
export const index = data => {
	return request({
		path: '/circle/store/homes',
		method: 'post',
		data,
		module: 'shop'
	})
}


// 门店详情
export const info = data => {
	return request({
		path: '/circle/store/shop_desc',
		method: 'post',
		data,
		module: 'shop'
	})
}

// 门店收藏
export const collection = data => {
	return request({
		path: '/circle/chat/collection',
		method: 'post',
		data,
		module: 'shop'
	})
}

// 门店取消收藏
export const del_collection = data => {
	return request({
		path: '/circle/chat/del_collection',
		method: 'post',
		data,
		module: 'shop'
	})
}


// 门店投诉
export const feedback = data => {
	return request({
		path: '/circle/user/feedback',
		method: 'post',
		data,
		module: 'shop'
	})
}


export const platRecommend = data => {
	return request({
		path: '/api/store/platRecommend',
		method: 'get',
		data,
		module: 'car'
	})
}




// 门店列表
export const shoplist = data => {
	return request({
		path: '/circle/store/shop_list',
		method: 'post',
		data,
		module: 'shop'
	})
}


// 门店分类列表
export const classList = data => {
	return request({
		path: '/circle/store/class',
		method: 'post',
		data,
		module: 'shop'
	})
}

// 门店分类列表
export const staffList = data => {
	return request({
		path: '/circle/store/staff',
		method: 'post',
		data,
		module: 'shop'
	})
}

// 员工详情列表
export const staff_desc = data => {
	return request({
		path: '/circle/store/staff_desc',
		method: 'post',
		data,
		module: 'shop'
	})
}


//商品列表
export const goodsList = data => {
	return request({
		path: '/circle/store/goods_list',
		method: 'post',
		data,
		module: 'shop'
	})
}


//优惠券列表
export const coupon = data => {
	return request({
		path: '/circle/store/coupon',
		method: 'post',
		data,
		module: 'shop'
	})
}


//领取优惠券
export const getcouponShop = data => {
	return request({
		path: '/circle/store/voucher_record',
		method: 'post',
		data,
		module: 'shop'
	})
}


//账单统计
export const bonusCounts = data => {
	return request({
		path: '/api/store/bonusCounts',
		method: 'get',
		data,
		module: 'car'
	})
}


//所有评价
export const getallpj = data => {
	return request({
		path: '/circle/store/store_evaluate',
		method: 'post',
		data,
		module: 'shop'
	})
}


//所有评价
export const goodsinfo = data => {
	return request({
		path: '/circle/store/goods_desc',
		method: 'post',
		data,
		module: 'shop'
	})
}


//查看购物车
export const showCartList = data => {
	return request({
		path: '/circle/cart/showCartList',
		method: 'post',
		data,
		module: 'shop'
	})
}

//添加购物车
export const addToCart = data => {
	return request({
		path: '/circle/cart/addToCart',
		method: 'post',
		data,
		module: 'shop'
	})
}


//删除购物车
export const delcart = data => {
	return request({
		path: '/circle/cart/del_cart',
		method: 'post',
		data,
		module: 'shop'
	})
}


//删除购物车
export const clean = data => {
	return request({
		path: '/circle/cart/clean',
		method: 'post',
		data,
		module: 'shop'
	})
}


// 商户端接口


// 登录
export const managerlogin = data => {
	return request({
		path: '/api/staff/login',
		method: 'post',
		data,
		module: 'car'
	})
}


 // 退出登录
 
export const loginOut = data => {
	return request({
		path: '/api/staff/logout',
		method: 'post',
		data,
		module: 'car'
	})
}


/// [评价回复]
export const answer = data => {
	return request({
		path: '/api/store/answer',
		method: 'post',
		data,
		module: 'car'
	})
}

// 分类列表
export const getGoodsClass = data => {
	return request({
		path: '/api/store/getGoodsClass',
		method: 'get',
		data,
		module: 'car'
	})
}

// 添加分类
export const addGoodsClass = data => {
	return request({
		path: '/api/store/addGoodsClass',
		method: 'post',
		data,
		module: 'car'
	})
}


// 添加单品
export const addGoods = data => {
	return request({
		path: '/api/store/addGoods',
		method: 'post',
		data,
		module: 'car'
	})
}

// 修改单品
export const editGoods = data => {
	return request({
		path: '/api/store/editGoods',
		method: 'post',
		data,
		module: 'car'
	})
}

// 获取单品详情
export const getGoodsInfo = data => {
	return request({
		path: '/api/store/editGoods',
		method: 'get',
		data,
		module: 'car'
	})
}


// 获取单品列表

export const getGoodsList = data => {
	return request({
		path: '/api/store/getGoods',
		method: 'get',
		data,
		module: 'car'
	})
}


// 修改分类
export const editGoodsClass = data => {
	return request({
		path: '/api/store/editGoodsClass',
		method: 'post',
		data,
		module: 'car'
	})
}

// 删除分类
export const delGoodsClass = data => {
	return request({
		path: '/api/store/delGoodsClass',
		method: 'get',
		data,
		module: 'car'
	})
}

// 优惠券列表
export const getCoupon = data => {
	return request({
		path: '/api/store/getCoupon',
		method: 'get',
		data,
		module: 'car'
	})
}


// 新增优惠券
export const addCoupon = data => {
	return request({
		path: '/api/store/addCoupon',
		method: 'post',
		data,
		module: 'car'
	})
}

// // 获取优惠券详情
// export const getCouponInfo = data => {
// 	return request({
// 		path: '/api/store/addCoupon',
// 		method: 'get',
// 		data,
// 		module: 'car'
// 	})
// }

// // 修改优惠券
// export const getCouponInfo = data => {
// 	return request({
// 		path: '/api/store/addCoupon',
// 		method: 'get',
// 		data,
// 		module: 'car'
// 	})
// }


// 单品列表
export const getGoods = data => {
	return request({
		path: '/api/store/getGoods',
		method: 'get',
		data,
		module: 'car'
	})
}



// 套餐列表
export const getGoodsPac = data => {
	return request({
		path: '/api/store/getGoodsPac',
		method: 'get',
		data,
		module: 'car'
	})
}

// 下架
export const setOff = data => {
	return request({
		path: '/api/store/setOff',
		method: 'get',
		data,
		module: 'car'
	})
}


// 上架
export const setOn = data => {
	return request({
		path: '/api/store/setOn',
		method: 'get',
		data,
		module: 'car'
	})
}


// 删除
export const delGoods = data => {
	return request({
		path: '/api/store/delGoods',
		method: 'get',
		data,
		module: 'car'
	})
}




// 优惠券上架
export const CouponAllow = data => {
	return request({
		path: '/api/store/CouponAllow',
		method: 'get',
		data,
		module: 'car'
	})
}



// 优惠券下架
export const CouponDisabled = data => {
	return request({
		path: '/api/store/CouponDisabled',
		method: 'get',
		data,
		module: 'car'
	})
}


// 删除优惠券
export const delCoupon = data => {
	return request({
		path: '/api/store/delCoupon',
		method: 'get',
		data,
		module: 'car'
	})
}



// 员工列表
export const getStaffList = data => {
	return request({
		path: '/api/store/getStaff',
		method: 'get',
		data,
		module: 'car'
	})
}

// 添加员工
export const addStaff = data => {
	return request({
		path: '/api/store/addStaff',
		method: 'post',
		data,
		module: 'car'
	})
}

// 添加员工
export const getStaffInfo = data => {
	return request({
		path: '/api/store/editStaff',
		method: 'get',
		data,
		module: 'car'
	})
}

// 修改员工
export const editStaff = data => {
	return request({
		path: '/api/store/editStaff',
		method: 'post',
		data,
		module: 'car'
	})
}

// 删除列表
export const delStaff = data => {
	return request({
		path: '/api/store/delStaff',
		method: 'get',
		data,
		module: 'car'
	})
}


// 店铺信息
export const editStore = data => {
	return request({
		path: '/api/staff/editStore',
		method: 'get',
		data,
		module: 'car'
	})
}

// 修改店铺信息
export const editStorePost = data => {
	return request({
		path: '/api/staff/editStore',
		method: 'post',
		data,
		module: 'car'
	})
}


// 店铺信息
export const changepass = data => {
	return request({
		path: '/api/staff/changepass',
		method: 'post',
		data,
		module: 'car'
	})
}



// 提现记录
export const forward = data => {
	return request({
		path: '/api/store/forward',
		method: 'get',
		data,
		module: 'car'
	})
}

// 银行卡管理
export const myBank = data => {
	return request({
		path: '/api/store/myBank',
		method: 'get',
		data,
		module: 'car'
	})
}


// 收益统计
export const storeBonus = data => {
	return request({
		path: '/api/store/storeBonus',
		method: 'get',
		data,
		module: 'car'
	})
}


// 收益统计
export const bonusDetail = data => {
	return request({
		path: '/api/store/bonusDetail',
		method: 'get',
		data,
		module: 'car'
	})
}

// 服务订单
export const myOrders = data => {
	return request({
		path: '/api/store/myOrders',
		method: 'get',
		data,
		module: 'car'
	})
}


// 服务订单
export const finance = data => {
	return request({
		path: '/api/store/finance',
		method: 'get',
		data,
		module: 'car'
	})
}

// 订单详情
export const orderdetail = data => {
	return request({
		path: '/api/store/orderdetail',
		method: 'get',
		data,
		module: 'car'
	})
}

// 商品订单下单

export const insertOrder = data => {
	return request({
		path: '/circle/order/insert_order',
		method: 'post',
		data,
		module: 'shop'
	})
}


// 获取验证码

export const sendBank = data => {
	return request({
		path: '/api/sms/sendBank',
		method: 'post',
		data,
		module: 'car'
	})
}


// 验证验证码

export const checkBank = data => {
	return request({
		path: '/api/sms/checkBank',
		method: 'post',
		data,
		module: 'car'
	})
}


// 绑定银行卡

export const bdBank = data => {
	return request({
		path: '/api/store/bdBank',
		method: 'post',
		data,
		module: 'car'
	})
}


// 支持银行卡列表

export const Banks = data => {
	return request({
		path: '/api/store/Banks',
		method: 'post',
		data,
		module: 'car'
	})
}


// 评价列表

export const getEvaluate = data => {
	return request({
		path: '/api/store/getEvaluate',
		method: 'get',
		data,
		module: 'car'
	})
}

// 评价列表

export const getWriteOff = data => {
	return request({
		path: '/api/store/writeOff',
		method: 'get',
		data,
		module: 'car'
	})
}
